home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0008-Yet more {ObjApp} p-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-02  |  2.5 KB  |  79 lines  |  [TEXT/GEOL]

  1. Item    1400316                         2-Oct-89        16:42
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith,PRT
  4.  
  5. To:     APPLE.BUGS                      Apple Bugs Reporting
  6.         MACAPP.TECH$                    MACAPP Tech
  7.         MACDTS                          Macintosh Developer Tech. Supt.
  8.  
  9. Sub:    Yet more {ObjApp} problems!
  10.  
  11. Yet one more link,
  12.  
  13. MPW seems to be behaving really strangely.
  14.  
  15. I have a script called DoMABuild which does this:
  16.  
  17. # DoMABuild Script
  18. open {MyOutput}
  19. echo DoMABuild Parameters  "{1}" "{2}" "{3}" "{4}"
  20. set olddir `directory`
  21. setdirectory "{SrcApp}"
  22. execute MABuild "{1}" "{2}" "{3}" "{4}"  > Dev:StdOut  ≥≥ Dev:StdOut
  23. setdirectory "{olddir}"
  24.  
  25. I also placed this line inside the beginning of MABuild.script
  26. echo MABuild Parameters  "{1}" "{2}" "{3}" "{4}"
  27.  
  28. If I execute this line from the workSheet:
  29. DoMABuild MyProgram -Sym
  30.  
  31. I get output of:
  32. DoMABuild Parameters MyProgram -Sym
  33. MABuild parameters MyProgram -Sym
  34.  
  35. followed by normal MABuild stuff.
  36.  
  37. but if I directly execute the line:
  38. execute MABuild MyProgram -Sym
  39.  
  40. I get Output of:
  41. MABuild Parameters
  42.  
  43. followed by normal MABuild stuff.
  44.  
  45. The following seems to be the case.  If I use the word execute directly I
  46. cannot access the parameters inside the executed script.  If I use the word
  47. execute inside a script then I can access the parameters inside the executed
  48. script.
  49.  
  50. The problem with this is that there is no way to keep the scope of the script
  51. global and still use parameters.  I need to access variables changed inside a
  52. script but in order to do that I need to use execute.  Execute "executed"
  53. directly loses the parameters. Thus execute will only be able to be used
  54. direcly without parameters, an unfortunate turn of events.
  55.  
  56. I believe that this is a bug!  Execute should handle parameters the same way
  57. whether called directly or from inside a script.
  58.  
  59. This whole thing means that I have to go about accessing the {SrcApp} and
  60. {ObjApp} variables in a different way.  I have to modify MABuild.script to
  61. output the results of
  62. SET SrcApp
  63. SET ObjApp
  64. to a file, and then "execute" this file in the global scope.  This really seems
  65. messy.  There ought to be a better way to have these values accessible in the
  66. global scope.
  67.  
  68. All I really want to be able to do is to run the application that I last built
  69. from a menu (whether -Sym  or not -debug or not etc).  Has anyone done this?
  70.  
  71. All this is with MPW 3.0
  72.  
  73. Yours,
  74. Curtis Faith
  75. Sierra Software Innovations
  76. (702) 832 - 7789
  77.  
  78.  
  79.